import { Module, NestModule ,MiddlewareConsumer, RequestMethod } from '@nestjs/common';
import { UserService } from './user.service';
import { UserController } from './user.controller';
import { Logger } from "../middeware";

@Module({
  controllers: [UserController],
  providers: [UserService],
})
export class UserModule implements NestModule {
  configure(consumer: MiddlewareConsumer) {
    // consumer.apply(Logger).forRoutes({ path:"v1/user", method: RequestMethod.POST });
    consumer.apply(Logger).forRoutes(UserController);

  }

}
